import { createRouter, createWebHistory } from "vue-router";
const routes = [
  {
    path: "/finance/collaborators",
    name: "finance-collaborators",
    component: () => import("@/views/collaborators/index.vue"),
    meta: {
      title: ["财务管理", "合作方管理"]
    }
  },
  {
    path: "/finance/account",
    name: "finance-account",
    component: () => import("@/views/account/index.vue"),
    meta: {
      title: ["财务管理", "合作方账户"]
    }
  },
  {
    path: "/finance/my-account",
    name: "finance-my-account",
    component: () => import("@/views/myAccount/index.vue"),
    meta: {
      title: ["财务管理", "我的账户"]
    }
  },
  {
    path: "/finance/invoices",
    name: "finance-invoices",
    component: () => import("@/views/invoices/index.vue"),
    meta: {
      title: ["财务管理", "财务单据"]
    }
  },
  {
    path: "/finance/payments",
    name: "finance-payments",
    component: () => import("@/views/payments/index.vue"),
    meta: {
      title: ["财务管理", "收支流水"]
    }
  },
  {
    path: "/finance/reconciliation",
    name: "finance-reconciliation",
    component: () => import("@/views/reconciliation/index.vue"),
    meta: {
      title: ["财务管理", "合作对账"]
    }
  },
  {
    path: "/finance/reimbursed-pay",
    name: "finance-reimbursed-pay",
    component: () => import("@/views/reimbursedPay/index.vue"),
    meta: {
      title: ["财务管理", "报销付款"]
    }
  },
  {
    path: "/finance/oa-reimbursed",
    name: "finance-oa-reimbursed",
    component: () => import("@/views/oaReimbursed/reimbursed/index.vue"),
    meta: {
      title: ["OA审批", "报销单"]
    }
  },
  {
    path: "/finance/oa-loan",
    name: "finance-oa-loan",
    component: () => import("@/views/oaReimbursed/loan/index.vue"),
    meta: {
      title: ["OA审批", "借款单"]
    }
  },
  {
    path: "/finance/oa-advance",
    name: "finance-oa-advance",
    component: () => import("@/views/oaReimbursed/advance/index.vue"),
    meta: {
      title: ["OA审批", "申请预付款"]
    }
  },
  {
    path: "/finance/oa-other",
    name: "finance-oa-other",
    component: () => import("@/views/oaReimbursed/other/index.vue"),
    meta: {
      title: ["OA审批", "其他收款申请"]
    }
  },
  {
    path: "/finance/reimbursed-manage",
    name: "finance-reimbursed-manage",
    component: () => import("@/views/reimbursedManage/index.vue"),
    meta: {
      title: ["财务管理", "报销管理"]
    }
  },
  {
    path: "/finance/loan-manage",
    name: "finance-loan-manage",
    component: () => import("@/views/loanManage/index.vue"),
    meta: {
      title: ["财务管理", "借款管理"]
    }
  },
  {
    path: "/finance/record",
    name: "finance-record",
    component: () => import("@/views/record/index.vue"),
    meta: {
      title: ["财务管理", "财务记账"]
    }
  },
  {
    path: "/finance/online",
    name: "finance-online",
    component: () => import("@/views/online/index.vue"),
    meta: {
      title: ["财务管理", "财务单据在线"]
    }
  },
  {
    path: "/finance/purse",
    name: "finance-purse",
    component: () => import("@/views/purse/index.vue"),
    meta: {
      title: ["财务管理", "我的钱包"]
    }
  },
  {
    path: "/finance/tradedetails",
    name: "finance-tradedetails",
    component: () => import("@/views/tradedetails/index.vue"),
    meta: {
      title: ["财务管理", "交易明细"]
    }
  },
  {
    path: "/finance/settlementManagement",
    name: "finance-settlementManagement",
    component: () => import("@/views/settlementManagement/index.vue"),
    meta: {
      title: ["财务管理", "结算管理"]
    }
  },
  {
    path: "/finance/requestsFunds",
    name: "finance-requestsFunds",
    component: () => import("@/views/requestFunds/index.vue"),
    meta: {
      title: ["财务管理", "费用请款"]
    }
  },
  {
    path: '/finance/projectProfit',
    name: 'finance-projectProfit',
    component: () => import('@/views/projectProfit/index.vue'),
    meta: {
      title: ['财务管理','项目利润']
    }
  }
];

const router = createRouter({
  history: createWebHistory(window.__MICRO_APP_BASE_ROUTE__ || "/"),
  routes
});

export default router;
